home *** CD-ROM | disk | FTP | other *** search
/ Champak 62 / Volume 62 - JOGO DISK .iso / Games / penguinpass.swf / scripts / frame_16 / PlaceObject2_86_76 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2008-03-17  |  2KB  |  54 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.score < 0)
  3.    {
  4.       _root.score = 0;
  5.    }
  6.    if(_root.placeposition > 0 && _root.gotshape == false)
  7.    {
  8.       _root.placeposition = 0;
  9.    }
  10.    if(_root.placeposition > 0 && _root.gotshape == true && _root.board[_root.placeposition] == 0 && _root.letclick == true)
  11.    {
  12.       _root.fx.gotoAndPlay("click");
  13.       _root.board[_root.placeposition] = 1;
  14.       _root.cursorshape.gotoAndStop(1);
  15.       _root.gotshape = false;
  16.       _root["pos" + _root.placeposition].placeshape = _root.cursorshape.placeshape;
  17.       _root["pos" + _root.placeposition].gotoAndStop(2);
  18.       _root.turn = _root.turn + 1;
  19.       _root.gotshape = true;
  20.       _root.cursorshape.placeshape = _root.nextshape.placeshape;
  21.       _root.cursorshape.gotoAndStop(2);
  22.       _root.nextshape.placeshape = _root["level" + _root.level][_root.turn + 1];
  23.       _root.nextshape.gotoAndStop(1);
  24.       _root.nextshape.gotoAndStop(2);
  25.       gs = _root["pos" + _root.placeposition].placeshape;
  26.       gy = _root.gy;
  27.       gx = _root.gx;
  28.       _root.grid[gy * 45 + gx * 3] = _root.block1[gs];
  29.       _root.grid[gy * 45 + (gx * 3 + 1)] = _root.block2[gs];
  30.       _root.grid[gy * 45 + (gx * 3 + 2)] = _root.block3[gs];
  31.       _root.grid[gy * 45 + 15 + gx * 3] = _root.block4[gs];
  32.       _root.grid[gy * 45 + 15 + (gx * 3 + 1)] = _root.block5[gs];
  33.       _root.grid[gy * 45 + 15 + (gx * 3 + 2)] = _root.block6[gs];
  34.       _root.grid[gy * 45 + 30 + gx * 3] = _root.block7[gs];
  35.       _root.grid[gy * 45 + 30 + (gx * 3 + 1)] = _root.block8[gs];
  36.       _root.grid[gy * 45 + 30 + (gx * 3 + 2)] = _root.block9[gs];
  37.       _root.populate();
  38.       if(_root["level" + _root.level][_root.turn] == 16)
  39.       {
  40.          _root.tthe = true;
  41.          gotshape = false;
  42.          _root.completed = true;
  43.          _root.placeposition = 0;
  44.          a = 0;
  45.          while(a <= 10)
  46.          {
  47.             _root.strip();
  48.             a++;
  49.          }
  50.          _root.penguin.gotoAndPlay(2);
  51.       }
  52.    }
  53. }
  54.